import { Modal } from "antd";
import React, { useCallback } from "react";
import styles from './style.less'


export type RemoveProps = {
  onRm: () => void
}


export function RemoveControl(props: RemoveProps) {

  const handleRemove = useCallback(() => {
    Modal.confirm({
      title: '系统提示',
      content: '真的要移除吗?',
      onOk: () => {
        props.onRm()
      }
    })
  }, [props])
  return (
    <div className={styles.rm} onClick={handleRemove}></div>
  )
}